package com.imti.xmlparserdemo;

import org.xml.sax.Attributes;
import org.xml.sax.SAXException;
import org.xml.sax.helpers.DefaultHandler;

public class SAXParser extends DefaultHandler
{

    /**
     * xml文档开始时调用
     */
    @Override
    public void startDocument() throws SAXException
    {
        super.startDocument();
    }
    /**
     * xml文档结束时调用
     */
    @Override
    public void endDocument() throws SAXException
    {
        super.endDocument();
    }

    /**
     * 标签开始时调用
     */
    @Override
    public void startElement(String uri, String localName, String qName, Attributes attributes)
        throws SAXException
    {
        super.startElement(uri, localName, qName, attributes);
    }

    /**
     * 标签结束时调用
     */
    @Override
    public void endElement(String uri, String localName, String qName) throws SAXException
    {
        super.endElement(uri, localName, qName);
    }

    /**
     * 获取标签内的值
     */
    @Override
    public void characters(char[] ch, int start, int length) throws SAXException
    {
        super.characters(ch, start, length);
    }
}
